package com.it.openfeign.feign;

import com.it.openfeign.Config.FeignConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Service
@FeignClient(name="discovery-nacos",path = "ProductController" /*,configuration = FeignConfig.class*/ )
public interface DiscoveryNacosFeign {
/*  此时会报错  param 0.
    从错误中我们得知@PathVariable注解的第0个值为空 ，也就是说 我这个id没有取到值
    请改成如下方法
    @RequestMapping("/{id}")
     String get(@PathVariable Integer id) throws InterruptedException;
*/

    @RequestMapping("/{id}")
    String get(@PathVariable(value="id") Integer id) throws InterruptedException;


}
